#include <stdio.h>
int fun(int w)
{
	int a,i; 
	int b=1;
	int n=0;
	int c=w;
	while(w)
	{
		w=w/10;
		n++;
	}
	for(i=0;i<n-1;i++)
	{
		b=b*10;
	}
	a=c%b;
	return a;
}

int main()
{
	int m;
    scanf("%d", &m);
    printf("The result is %d\n", fun(m));
	return 0;
 }
